package com.bone.constant;




public class PayPaymentConstant {
	
	public static enum ORDER_PAYMENT_TYPE {
		ORDER_PAY("正常支付"),
		ORDER_PRE_PAY("预授权支付");
		
		private String cnName;
		ORDER_PAYMENT_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(ORDER_PAYMENT_TYPE item:ORDER_PAYMENT_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return "code:"+this.name()+",cnName:"+this.cnName;
		}
	}
	
	public static enum TRANSCATION_TYPE {
		PAYMENT("付款"),
		REFUNDMENT("退款"),
		DRAWCASH("提款"),
		RECHARGE("充值");
		 
		private String cnName;
		TRANSCATION_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(TRANSCATION_TYPE item:TRANSCATION_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum PAYMENT_GATEWAY {
		ALIPAY("支付宝"),
		UNOION("银联支付"),
		CHINAPNR("汇付天下"),
		CASH("现金支付"),
		EXCHANGE("银行转帐"),
		CHEQUE("支票"),
		POST("邮局汇款"),
		CASH_ACCOUNT("存款账户"),
		STORED_CARD("储值卡"),
		PAY_0_YUAN("0元支付"),
		COMM_POS("交通银行POS在线支付"),
		COMM_POS_CASH("交通银行POS现金支付"),
		TELBYPAY("电话预授权"),
		ALIPAY_OFFLINE("淘宝订单"),
		UPOMP("移动客户端支付");
		
		private String cnName;
		PAYMENT_GATEWAY(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(PAYMENT_GATEWAY item:PAYMENT_GATEWAY.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return "code:"+this.name()+",cnName:"+this.cnName;
		}
	}
	public static enum PAY_REFUNMENT_SERIAL_STATUS {
		/** 新建 */
		CREATE("新建"),
		/** 成功 */
		SUCCESS("成功"),
		/** 失败 */
		FAIL("失败");	
		
		private String cnName;
		PAY_REFUNMENT_SERIAL_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(PAY_REFUNMENT_SERIAL_STATUS item:PAY_REFUNMENT_SERIAL_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return "code:"+this.name()+",cnName:"+this.cnName;
		}
	}
	public static enum PAYMENT_SERIAL_STATUS {
		CREATE("新建"),
		SUCCESS("成功"),
		FAIL("失败");
		private String cnName;
		PAYMENT_SERIAL_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(PAYMENT_SERIAL_STATUS item:PAYMENT_SERIAL_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
}
